-
Notifications
You must be signed in to change notification settings - Fork 135
chore(pegboard-gateway): remove TunnelAck
#3488
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore(pegboard-gateway): remove TunnelAck
#3488
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
3 Skipped Deployments
|
Pull Request Review: Remove
|
972242d to
556b074
Compare
4adef6f to
759df3e
Compare
556b074 to
972242d
Compare
759df3e to
4adef6f
Compare
PR Review: Remove
|
Code Review - PR #3488: Remove
|
PR Review: Remove
|
Pull Request Review: Remove
|
4adef6f to
759df3e
Compare
972242d to
556b074
Compare
Code Review: Remove TunnelAckSummaryThis PR removes the ✅ Positive Observations
|
PR Review: Remove
|
Pull Request ReviewThis PR removes the 🔴 Critical Issues1. Breaking Protocol Change Without Migration Path
2. Incomplete TODO Comments
3. Missing Error Handling for WebSocket Message Index
|
Code ReviewI've reviewed PR #3488 which removes the SummaryThis PR removes the bidirectional acknowledgment system ( ✅ What's Done WellProtocol Design
Backwards Compatibility
Code Simplification
|
bb070a3 to
bdf8c0e
Compare
Code Review: Remove TunnelAckThis PR simplifies the tunnel protocol by removing the ✅ Strengths
🔍 Concerns & Recommendations1. Missing Cleanup Logic (Critical)Location: The PR removes logic that sends Before: When a runner disconnected, all active HTTP requests received abort messages. Impact: HTTP requests may hang or timeout instead of failing fast when a runner disconnects. Recommendation: Consider whether this cleanup is still needed. If the gateway can detect runner disconnection through other means (e.g., watching the in_flight_requests map), document this. Otherwise, restore the cleanup logic. 2. TODOs Left in CodeLocation:
Multiple TODO comments reference the old acknowledgment logic but are not implemented: Ok(protocol::ToGateway::ToGatewayKeepAlive) => {
// TODO:
// let prev_len = in_flight.pending_msgs.len();
// ...
}Recommendation: Either implement the keep-alive logic or remove these TODOs if they're no longer needed. Commented-out code should generally be removed. 3. Gateway ID Initialization in ConversionsLocation: When converting from v2 to v3, the gateway_id: [0; 16],Concern: A zero UUID could cause issues if the code expects valid UUIDs. Recommendation: Document whether zero UUIDs are acceptable for backward compatibility scenarios, or add validation to reject them. 4. Pending Messages Not ClearedLocation: The gateway still maintains a
Impact: Memory leak for long-running connections with many messages. Recommendation: Either implement the new keep-alive clearing logic or remove the 5. TypeScript SDK ChangesLocation: The TypeScript changes look mechanically correct, properly removing
Recommendation: Version this as a breaking change and ensure all TypeScript clients are updated. 📝 Minor Issues
🎯 SummaryThis is a good refactoring that simplifies the protocol. The main concerns are:
Verdict: |
PR Review: Remove
|
bdf8c0e to
bb070a3
Compare
5046fa3 to
95c2777
Compare
Pull Request Review: Remove
|
PR Review: Remove
|
bb070a3 to
bdf8c0e
Compare
95c2777 to
5046fa3
Compare
Pull Request Review: Remove
|
PR Review: Remove
|
bdf8c0e to
bb070a3
Compare
Pull Request Review: Remove TunnelAckSummaryThis PR removes the TunnelAck acknowledgment mechanism from the runner protocol and replaces it with a simpler gateway ID-based routing approach. Overall, this is a significant architectural improvement that simplifies the tunnel message flow. The implementation is solid with good attention to backwards compatibility. Strengths1. Simplified Architecture
2. Protocol EvolutionThe new ToRunner and ToGateway union types provide better separation of concerns 3. Backwards CompatibilityGood handling where v2 TunnelAck messages are converted to abort messages Issues and ConcernsCRITICAL: Incomplete Refactor - Dead CodeLocation: pegboard-gateway/src/shared_state.rs:227-249 The ToGatewayKeepAlive handler contains commented-out TODO code. The pending_msgs field still exists but is never cleaned up, which will cause it to grow unbounded and potentially leak memory. Recommendation: Either complete the ToGatewayKeepAlive implementation, remove pending_msgs entirely, or add a clear comment explaining the plan. MODERATE: Missing gateway_id in TypeScriptLocation: engine/sdks/typescript/runner/src/tunnel.ts:430-438 The TypeScript runner sendMessage method does not populate gateway_id in ToServerTunnelMessage, but the protocol shows gatewayId as a required field. This will likely cause serialization errors. The TypeScript code needs to extract gateway_id from incoming messages, store it per-request, and include it in outgoing responses. MODERATE: Index Conversion Logic ConcernLocation: engine/sdks/rust/runner-protocol/src/versioned.rs:1220 Verify that v2 protocol schema actually has the index field, otherwise this will fail at runtime when deserializing v2 messages. Action ItemsBefore Merge (Critical):
VerdictThis is a good architectural improvement, but there are critical issues that must be addressed before merging. Once these are resolved, this PR will significantly simplify the tunnel protocol. Great work on maintaining backwards compatibility! Generated with Claude Code |
Merge activity
|

No description provided.